
#pragma once

#include "ecs/default_plugin.hpp"

namespace qbe::ecs {

void init_timer(World& w) {
  w.insert_resource<Time>(Time());
};
void update_timer(Resource<Time> time) {
  time.get().update_with_instant(std::chrono::high_resolution_clock::now());
};

void init_default_schedules(App& app) {

  app.add_stage<stage::Startup>();
  app.add_stage<stage::PreStartup>();
  app.add_stage<stage::PostStartup>();

  app.add_stage<stage::First>();
  app.add_stage<stage::Update>();
  app.add_stage<stage::PreUpdate>();
  app.add_stage<stage::PostUpdate>();

  app.add_stage<stage::Last>();
}

}  // namespace qbe::ecs
